package com.future.direction.ui.activity;

import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.future.direction.R;
import com.future.direction.common.Constant;
import com.future.direction.common.util.UIUtil;
import com.future.direction.di.component.AppComponent;
import com.future.direction.ui.widget.MyTitleBar;

import butterknife.BindView;

/**
 * Created by zhp on 2019-11-08
 */
public class AccountActivity extends BaseActivity implements View.OnClickListener {

    @BindView(R.id.titleBar)
    MyTitleBar titleBar;
    @BindView(R.id.tv_account_balance)
    TextView tvAccountBalance;
    @BindView(R.id.tv_account_take_in)
    TextView tvAccountTakeIn;
    @BindView(R.id.tv_account_turn_balance)
    TextView tvAccountTurnBalance;
    @BindView(R.id.tv_account_count)
    TextView tvAccountCount;
    @BindView(R.id.iv_account_go_give)
    ImageView ivAccountGoGive;
    @BindView(R.id.rl_account_withdraw)
    RelativeLayout rlAccountWithdraw;
    @BindView(R.id.rl_account_list)
    RelativeLayout rlAccountList;
    @BindView(R.id.rl_account_record)
    RelativeLayout rlAccountRecord;

    @Override
    public int setLayout() {
        return R.layout.activity_account;
    }

    @Override
    public void getExtras() {

    }

    @Override
    public boolean init() {
        return false;
    }

    @Override
    public void setListener() {
        backListener(titleBar);
        ivAccountGoGive.setOnClickListener(this);
        rlAccountWithdraw.setOnClickListener(this);
        rlAccountList.setOnClickListener(this);
        rlAccountRecord.setOnClickListener(this);
    }

    @Override
    public void setupAcitivtyComponent(AppComponent appComponent) {

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.iv_account_go_give:
                //TODO 赠送
                break;
            case R.id.rl_account_withdraw:
                startActivity(new Intent(UIUtil.getContext(), WithDrawalActivity.class));
                break;
            case R.id.rl_account_list:
                Intent intent1 = new Intent(UIUtil.getContext(), DiamondsRecordActivity.class);
                intent1.putExtra(Constant.data, "收入明细");
                startActivity(intent1);
//                startActivity(new Intent(UIUtil.getContext(), BindPhoneTwoActivity.class));
                break;
            case R.id.rl_account_record:
                Intent intent = new Intent(UIUtil.getContext(), DiamondsRecordActivity.class);
                intent.putExtra(Constant.data, "提现记录");
                startActivity(intent);
                break;
        }
    }
}
